package controlador;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JFrame;
//import modelo.Palabra;
import modelo.JuegoAhorcado;
import vista.VistaPrincipal;


public class ControladorPrincipal{
	private VistaPrincipal principal; 
	//Palabra cadena = new Palabra();
	JuegoAhorcado juego = new JuegoAhorcado();
	
	int dif = 0;
	
	public ControladorPrincipal(final JFrame jfrm) {
		super();
		principal = new VistaPrincipal(jfrm, this);
		principal.setVisible(true);	
		
principal.getBtnInstrucciones().addActionListener(new ActionListener(){
			
			@Override
			public void actionPerformed(ActionEvent e) {
				// TODO Auto-generated method stub
				new ControladorInstrucciones(null);
				
			}
		});
principal.getBtnAdministrador().addActionListener(new ActionListener(){
	
	@Override
	public void actionPerformed(ActionEvent e) {
		// TODO Auto-generated method stub
		new ControladorClave();
		
	}
});
		principal.getBtnPuntajes().addActionListener(new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				// TODO Auto-generated method stub
				new ControladorPuntaje ();
				 
			}
		});

		principal.getSalir().addActionListener(new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				// TODO Auto-generated method stub
				principal.dispose();
			}
		});
		principal.getBtnJugar().addActionListener(new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				// TODO Auto-generated method stub
				
				new ControladorJuego(jfrm);
			}
		});
		
	
	}
}
